package com.mew.common.dc.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.mew.common.entity.back.Admin;
import com.mew.common.entity.back.AdminEa;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mew.common.vo.web.AdminEaVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * admin 歐美附加 Mapper 接口
 * </p>
 *
 * @author Dylin
 * @since 2021-08-24
 */
@DS("mew_record")
public interface AdminEaMapper extends BaseMapper<AdminEa> {
    List<AdminEaVo> queryAdminEa(@Param("account") String account, @Param("agentId") int agentId, @Param("canAll") boolean canAll);

    List<AdminEaVo> getAdminEaByParentId(@Param("id") Integer id);

    void batchUpdateStateByUsernames(@Param("ids") String[] ids, @Param("state") int state);

    void batchUpdatePasswordByUsernames(@Param("ids") String[] ids, @Param("password") String password);

    int redeem(@Param("adminId") int adminId, @Param("num") Long num);

    int recharge(@Param("adminId") int adminId, @Param("num") Long num);

    List<AdminEa> queryAdminEaByAccount(@Param("account") String account);

    List<AdminEaVo> queryAgentLevel(@Param("username")String username);

    AdminEaVo queryRoleName(@Param("username")String username);




}
